/*
 * @Author: your name
 * @Date: 2020-01-14 23:02:09
 * @LastEditTime: 2020-01-14 23:02:32
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /hdreoprt/src/utils/request.js
 */

import axios from 'axios'

import {AXIOS_DEFAULT_CONF,AXIOS_REQUEST,AXIOS_RESPONSE} from '@/config/axiosConf'

const server = axios.create(AXIOS_DEFAULT_CONF)

server.defaults.headers.post['Content-Type'] = 'application/json';

//请求拦截器
server.interceptors.request.use(AXIOS_REQUEST.SUCCESS,AXIOS_REQUEST.ERROR)

//响应拦截器
server.interceptors.response.use(AXIOS_RESPONSE.SUCCESS,AXIOS_RESPONSE.ERROR)

export default server